package com.wangyadong.hobby.schedule.jobtask;

import java.util.HashMap;
import java.util.Map;

/**
 * @ClassName Seconds
 * @Description TODO
 * @Authpr Antonio
 * @Data 2018-06-13 11:35
 */
public class Seconds {
    /**
     * @param
     * @return 该毫秒数转换为 * days * hours * minutes * seconds 后的格式
     * @author fy.zhang
     */
    public static String formatDuring(long mss) {
        long days = mss / (1000 * 60 * 60 * 24);
        long hours = (mss % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60);
        long minutes = (mss % (1000 * 60 * 60)) / (1000 * 60);
        long seconds = (mss % (1000 * 60)) / 1000;
        return days + " days " + hours + " hours " + minutes + " minutes "
                + seconds + " seconds ";
    }



    public static void main(String[] args) {
        //156251  331305 156251
        System.out.println(formatDuring(156251));
    }
}
